fix(oceanbase-oracle): escape SQL identifiers and literals in metadata/DDL paths (#1914) - #2205
Merged
Merged
Conversation
…ierProcessor per maintainer review (OtterMind#1914) - new OceanbaseOracleIdentifierProcessor (SPI ISQLIdentifierProcessor): quoteIdentifier with double-quote doubling, escapeString with single-quote doubling - OceanbaseOracleMetaData overrides getSQLIdentifierProcessor(); DDL builder helpers use OceanbaseOracleIdentifierProcessor.INSTANCE - OceanbaseOracleSqlEscapes removed; tests migrated (5 green)
…always-quote for DDL paths (OtterMind#1914) - quoteIdentifier(String) is conditional again: null/blank passthrough, plain non-reserved identifiers returned unquoted (fixes GenericSqlCompletionEngine raw-vs-quoted mismatches); other inputs are double-quote wrapped with embedded-quote doubling - new quoteIdentifierAlways(String) for DDL-generation call sites that require unconditional quoting; quoteIdentifierIgnoreCase is the always-quote SPI variant and delegates to it - processor now extends OracleIdentifierProcessor to inherit the Oracle reserved-keyword set; versioned overload delegates to quoteIdentifier(String) - tests cover conditional and always behaviors incl. null passthrough (10 green)
… empty quoted identifier) (OtterMind#1914)
openai0229
force-pushed
the
fix/sqli2-oceanbase-oracle
branch
from
July 29, 2026 12:48
ba65b8b to
75f2ece
Compare
openai0229
approved these changes
Jul 29, 2026
openai0229
left a comment
Contributor
There was a problem hiding this comment.
Rebased on the latest main and verified Oracle-compatible identifier semantics, exact quote/remove round trips, metadata literal escaping, and generated comment identifiers. The clean 9-module reactor passes with OceanBase Oracle 12/12, Oracle 44/44, SPI 90/90, and tools 26/26.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue
Closes #1914
Summary
DBMS_METADATAand catalog queries.SqlUtils.quoteObjectNamepath in generated table and column comments with full dialect identifier tokens.Affected surfaces
Verification
mvn -f chat2db-community-server/pom.xml -pl chat2db-community-plugins/chat2db-community-oceanbase-oracle -am clean test -DskipTests=false -Dmaven.test.skip=falseBUILD SUCCESS; tools 26/26, SPI 90/90, Oracle 44/44, OceanBase Oracle 12/12; zero failures, errors, or skipped tests in these modules.git diff --check origin/main...HEADRisk and compatibility
Reviewer map
chat2db-community-server/chat2db-community-plugins/chat2db-community-oceanbase-oracle/src/main/java/ai/chat2db/plugin/oceanbase/oracle/OceanbaseOracleMetaData.java, thenidentifier/OceanbaseOracleIdentifierProcessor.javaandOceanbaseOracleIdentifierProcessorTest.java.Contributor declaration
AI assistance: Maintainer used AI-assisted code review and test development; all resulting changes were source-reviewed and verified with the clean Maven reactor reported above.